function qs = Elnqpi_losses(mix)

% E[ln q(pi)]

K = mix.ncentres;

qs = zeros(1, K);
if isfield(mix.varprior, 'a0')
    a = mix.varposterior.a;

    for k = 1:K
        comps = [1:(k-1) (k+1):K];
        exp_logmix = dirichletln_exp(a(comps));
        qs(k) = dirichletln(exp_logmix, a(comps), 'log');
    end
end

